package com.test.demo.service.Imp;

import com.test.demo.dao.GranteMapper;
import com.test.demo.model.Grante;
import com.test.demo.service.GranteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
/** 范琳*/
@Service
public class GranteServiceImp implements GranteService {

    @Autowired
    private GranteMapper granteMapper;

    @Override
    public Grante selectByPrimaryKeygra(Integer gid) {
        return granteMapper.selectByPrimaryKeygra(gid);
    }

    @Override
    public List<Grante> getGid() {
        System.out.println("执行角色类型SQL语句");
        return granteMapper.getGid();
    }
    //获取全部角色信息G
    @Override
    public List<Grante> getAllg(){
        return  granteMapper.getAllg();
    }
    //删除角色信息
    @Override
    public int delGrante(Integer gid) {
        return granteMapper.delGrante(gid);
    }
    //新增角色信息
    @Override
    public int insertGrante(Grante grantemodel) {
        return granteMapper.insertGrante(grantemodel);
    }
    // 更新数据
    @Override
    public int updateGrante(Grante grantemodel) {
        return granteMapper.updateGrante(grantemodel);
    }


}
